package com.cy.store.vo;

import com.cy.store.entity.BaseEntity;

import java.io.Serializable;
import java.util.Date;

public class OrderVo extends BaseEntity implements Serializable {
    private Integer oid;
    private Integer uid;
    private Integer pid;
    private Long price;//单价
    private Integer num;
    private String title;
    private Long total_price;//所有总价
    private String image;
    private String recv_name;
    private Date order_time;

    public String getRecv_name() {
        return recv_name;
    }

    public void setRecv_name(String recv_name) {
        this.recv_name = recv_name;
    }

    public Date getOrder_time() {
        return order_time;
    }

    public void setOrder_time(Date order_time) {
        this.order_time = order_time;
    }

    public Integer getOid() {
        return oid;
    }

    public void setOid(Integer oid) {
        this.oid = oid;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getTotal_price() {
        return total_price;
    }

    public void setTotal_price(Long total_price) {
        this.total_price = total_price;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof OrderVo)) return false;

        OrderVo orderVo = (OrderVo) o;

        if (getOid() != null ? !getOid().equals(orderVo.getOid()) : orderVo.getOid() != null) return false;
        if (getUid() != null ? !getUid().equals(orderVo.getUid()) : orderVo.getUid() != null) return false;
        if (getPid() != null ? !getPid().equals(orderVo.getPid()) : orderVo.getPid() != null) return false;
        if (getPrice() != null ? !getPrice().equals(orderVo.getPrice()) : orderVo.getPrice() != null) return false;
        if (getNum() != null ? !getNum().equals(orderVo.getNum()) : orderVo.getNum() != null) return false;
        if (getTitle() != null ? !getTitle().equals(orderVo.getTitle()) : orderVo.getTitle() != null) return false;
        if (getTotal_price() != null ? !getTotal_price().equals(orderVo.getTotal_price()) : orderVo.getTotal_price() != null)
            return false;
        if (getImage() != null ? !getImage().equals(orderVo.getImage()) : orderVo.getImage() != null) return false;
        if (getRecv_name() != null ? !getRecv_name().equals(orderVo.getRecv_name()) : orderVo.getRecv_name() != null)
            return false;
        return getOrder_time() != null ? getOrder_time().equals(orderVo.getOrder_time()) : orderVo.getOrder_time() == null;
    }

    @Override
    public int hashCode() {
        int result = getOid() != null ? getOid().hashCode() : 0;
        result = 31 * result + (getUid() != null ? getUid().hashCode() : 0);
        result = 31 * result + (getPid() != null ? getPid().hashCode() : 0);
        result = 31 * result + (getPrice() != null ? getPrice().hashCode() : 0);
        result = 31 * result + (getNum() != null ? getNum().hashCode() : 0);
        result = 31 * result + (getTitle() != null ? getTitle().hashCode() : 0);
        result = 31 * result + (getTotal_price() != null ? getTotal_price().hashCode() : 0);
        result = 31 * result + (getImage() != null ? getImage().hashCode() : 0);
        result = 31 * result + (getRecv_name() != null ? getRecv_name().hashCode() : 0);
        result = 31 * result + (getOrder_time() != null ? getOrder_time().hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "OrderVo{" +
                "oid=" + oid +
                ", uid=" + uid +
                ", pid=" + pid +
                ", price=" + price +
                ", num=" + num +
                ", title='" + title + '\'' +
                ", total_price=" + total_price +
                ", image='" + image + '\'' +
                ", recv_name='" + recv_name + '\'' +
                ", order_time=" + order_time +
                '}';
    }
}
